home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Locus / Source / Group.h < prev    next >
Text File  |  1995-06-12  |  3KB  |  163 lines

  1.  
  2. /*
  3.     Copyright 1993  Jeremy Slade.  All rights reserved.
  4. */
  5.  
  6. /*
  7.     Project: Locus
  8.     
  9.     Class: Group
  10.     
  11.     Description:
  12.     [ FULL DESCRIPTION ]
  13.     
  14.     Original Author: Jeremy Slade
  15.     
  16.     Revision History:
  17.         Created
  18.             V.101    JGS Mon Feb  8 22:09:29 GMT-0700 1993
  19.  
  20. */
  21.  
  22.  
  23. #ifndef Group_h
  24. #define Group_h
  25.  
  26. #define Group_VERSION    (101)
  27.  
  28.  
  29. #import <objc/List.h>
  30. #import <ctype.h> // For isDigit()
  31. #import "Folder.h"
  32. #import "ItemCell.h"
  33.  
  34.  
  35. // Legal keys for keyEquivalent ----------------------------------------------
  36. // Right now, commandKey: events are automatically sent to
  37. // the KeyWindow, and then to the MainWindow, before being
  38. // processed by everything else, such as the menus.  So, all keys
  39. // are valid key equivalents
  40. #define isGoodKeyEq(c)    (isgraph(c)) // All printing chars, including space
  41.  
  42.  
  43. @interface Group : List
  44. {
  45.     char    *groupName;
  46.     int tag;    // Unique ident within a folder -- Assigned by folder
  47.     unsigned short    keyEquivalent;
  48.  
  49.     DrawInfo drawInfo;
  50.  
  51.     BOOL isChanged;
  52.     BOOL needsSort;
  53.     BOOL restrictTypes;
  54.     BOOL sortItems;
  55.     
  56.     id    typesList; // AtomList of allowed file types for this group
  57.     
  58.     id    dynamicItemSpecs; // List of the DynamicItemSpecs
  59.     float dynamicUpdateInterval; // Interval between dynamic updates (in secs)
  60.     DPSTimedEntry updateTE;    // TimedEntry for performing updates
  61.     
  62.     char *filter;    // Display filter epxression -- currently unused
  63.     char *defaultPath;    // Default Path this group is associated with
  64.     
  65.     id    folder;
  66.  
  67. }
  68.  
  69. // Creating, initializing methods
  70. + initialize;
  71. + new;
  72. - init;
  73. - initCount:(unsigned int)numSlots;
  74. - free;
  75.  
  76. // Naming Group
  77. - setGroupName:(const char *)aString;
  78. - (const char *)groupName;
  79.  
  80. // Group tag
  81. - setTag:(int)aTag;
  82. - (int)tag;
  83.  
  84. // Setting general attributes
  85. - setKeyEquivalent:(unsigned short)charCode;
  86. - setDefaultPath:(const char *)fullpath;
  87. - setSortItems:(BOOL)flag;
  88. - (unsigned short)keyEquivalent;
  89. - (const char *)defaultPath;
  90. - (BOOL)doesSortItems;
  91.  
  92. // Setting Drawing attributes
  93. - setDrawMode:(int)aMode;
  94. - (int)drawMode;
  95. - setDrawActualImage:(BOOL)flag;
  96. - (BOOL)doesDrawActualImage;
  97. - setDrawTriDots:(BOOL)flag;
  98. - (BOOL)doesDrawTriDots;
  99. - setDrawInfoLine1:(BOOL)flag;
  100. - (BOOL)doesDrawInfoLine1;
  101. - setDrawInfoLine2:(BOOL)flag;
  102. - (BOOL)doesDrawInfoLine2;
  103. - setLBNameMode:(int)mode;
  104. - (int)lbNameMode;
  105. - setDrawSmallIcons:(BOOL)flag;
  106. - (BOOL)doesDrawSmallIcons;
  107. - setSBNameMode:(int)mode;
  108. - (int)sbNameMode;
  109. - setLIDrawName:(BOOL)flag;
  110. - (BOOL)liDoesDrawName;
  111. - setSIDrawName:(BOOL)flag;
  112. - (BOOL)siDoesDrawName;
  113. - getDrawInfo:(DrawInfo *)info;
  114.  
  115. // Allowed File Types
  116. - addAllowedType:(const char *)anExt;
  117. - removeAllowedType:(const char *)anExt;
  118. - setRestrictTypes:(BOOL)flag;
  119. - (const char **)allowedTypes;
  120. - (BOOL)doesRestrictTypes;
  121. - (BOOL)isAllowedType:(const char *)path;
  122.  
  123. // Adding items
  124. - addItem:(const char *)path;
  125. - (BOOL)itemExists:(const char *)path;
  126. - itemMatching:(const char *)path;
  127. - cleanUp:sender;
  128.  
  129. // Sorting Items
  130. - sortItems;
  131. - explicitSortItems:sender;
  132.  
  133. // Making selection
  134. - selectItem:sender;
  135. - selectAll:sender;
  136. - selection;
  137. - selectionList;
  138. - (int)selectionCount;
  139.  
  140. // Acting on items
  141. - launchSelectedItems:sender;
  142. - removeSelectedItems:sender;
  143. - copyItemToPboard:sender;    
  144.  
  145. // Folder
  146. - setFolder:aFolder;
  147. - folder;
  148. - setChanged:(BOOL)flag;
  149. - (BOOL)isChanged;
  150. - setNeedsShow:(BOOL)flag;
  151. - (BOOL)needsShow;
  152.  
  153. // Archiving
  154. - awake;
  155. - read:(NXTypedStream *)stream;
  156. - write:(NXTypedStream *)stream;
  157. - writeSelf;
  158. - (const char *)getGroupFilename;
  159.  
  160. @end
  161.  
  162. #endif // Group_h
  163.